/**
 * Created by xiongyongshun on 15/11/20.
 */

function initSideBarMenuItem(menuItem) {
    // menuItem 是侧边栏中的一项条目, 是最小的单元, 其类型是 li
    // menuItem 的父元素是 <ul class="treeview-menu" />

    var currentMenu = menuItem.parent();
    var currentTreeView = currentMenu.parent();
    currentTreeView.siblings().filter(".treeview").removeClass('menu-open');

    currentMenu.slideDown(50, function () {
        currentMenu.addClass('menu-open');
    });
    menuItem.addClass("active");
    menuItem.siblings().removeClass("active");
}